package com.qyhl.webtv.module_news.serviceimpl;

import android.content.Context;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.qyhl.webtv.basiclib.base.BaseFragment;
import com.qyhl.webtv.commonlib.constant.ServicePathConstant;
import com.qyhl.webtv.commonlib.service.NewsService;
import com.qyhl.webtv.commonlib.utils.inter.HomeActivityInterface;
import com.qyhl.webtv.module_news.luckydraw.LuckDrawHomeFragment;
import com.qyhl.webtv.module_news.news.column.ColumnNewsListFragment;
import com.qyhl.webtv.module_news.news.goodlife.GoodLifeFragment;
import com.qyhl.webtv.module_news.news.information.program.ProgramFragment;
import com.qyhl.webtv.module_news.news.jlnews.list.JLNewsListFragment;
import com.qyhl.webtv.module_news.news.jlnews.multi.JLMultiNewsFragment;
import com.qyhl.webtv.module_news.news.nanbu.NanBuNewsFragment;
import com.qyhl.webtv.module_news.news.newslist.NewListFragment;
import com.qyhl.webtv.module_news.news.titlenews.TitleNewsFragment;
import com.qyhl.webtv.module_news.news.union.government.GovernmentListFragment;
import com.qyhl.webtv.module_news.news.union.special.SpecialListFragment;
import com.qyhl.webtv.module_news.news.union.town.Town3ListFragment;
import com.qyhl.webtv.module_news.news.union.town.TownListFragment;
import com.qyhl.webtv.module_news.news.union.town2.Town2ListMainFragment;

/**
 * 新闻服务接口
 *
 * @author helin
 * @date 2019年6月4日11:41:55
 */
@Route(path = ServicePathConstant.NEWS_SERVICE)
public class NewsServiceImpl implements NewsService {
    @Override
    public BaseFragment getProgramFragment(String menuId, String type) {
        return ProgramFragment.newInstance(menuId, type);
    }

    @Override
    public BaseFragment getProgramFragment(String menuId, String type, boolean hasNew) {
        return ProgramFragment.newInstance(menuId,type,hasNew);
    }

    @Override
    public BaseFragment getTitleNewsFragment(String title, String url) {
        return TitleNewsFragment.newInstance(title, url);
    }

    @Override
    public BaseFragment getTitleNewsFragment(String title, String url, String id, boolean hasJS) {
        return TitleNewsFragment.newInstance(title, url,id,hasJS);
    }

    @Override
    public BaseFragment getNewListFragment(String sectionId) {
        return NewListFragment.newInstance(sectionId);
    }

    @Override
    public BaseFragment getGoodLifeFragment() {
        return GoodLifeFragment.newInstance();
    }

    @Override
    public BaseFragment getTownListFragment(String title, String url) {
        return TownListFragment.newInstance(title, url);
    }

    @Override
    public BaseFragment getGovernmentListFragment(String title, String url) {
        return GovernmentListFragment.newInstance(title, url);
    }

    @Override
    public BaseFragment getSpecialListFragment(String title, String url, boolean isBottom) {
        return SpecialListFragment.newInstance(title, url, isBottom);
    }

    @Override
    public BaseFragment getTown3ListFragment(String title, String url) {
        return Town3ListFragment.newInstance(title, url);
    }

    @Override
    public BaseFragment getTown2ListMainFragment(String url) {
        return Town2ListMainFragment.newInstance(url);
    }

    @Override
    public BaseFragment getJLNewsListFragment(int type) {
        return JLNewsListFragment.newInstance(type);
    }

    @Override
    public BaseFragment getJLMultiNewsFragment() {
        return JLMultiNewsFragment.newInstance();
    }

    @Override
    public BaseFragment getLuckDrawHomeFragment(String s, String menuName, HomeActivityInterface homeActivityInterface) {
        return LuckDrawHomeFragment.newInstance(s, menuName, homeActivityInterface);
    }

    @Override
    public BaseFragment getSDColumnFragment(String sectionId, int type) {
        return ColumnNewsListFragment.newInstance(sectionId, type);
    }

    @Override
    public BaseFragment getNanBuNewListFragment(String sectionId, int type) {
        return NanBuNewsFragment.newInstance(sectionId,type);
    }

    @Override
    public void init(Context context) {

    }
}
